﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RegisterCardManager.aspx.cs" Inherits="BalanceCenter_RegisterCardManager" %>

<%@ Register TagPrefix="ShoveWebUI" Namespace="Shove.Web.UI" Assembly="Shove.Web.UI.2 For.NET 2.0" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>山顶软件 - 商品档案</title>
    <link href="../Style/css.css" rel="stylesheet" type="text/css" />
    <link href="../Style/main.css" rel="stylesheet" type="text/css" />    
    
    <script language="javascript" type="text/javascript">
          
        //Excel导入
        function ExcelInput()
        {      
            var url="ExcelInput.aspx";
            var Width="350";
            var Height="140";
            var arguemnts = new Object();            
            arguemnts.window = window;                        
            
            //window.showModalDialog(url,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;status:no;scroll:no;");
            if (document.all && window.print)
            {
                 window.showModalDialog(url,arguemnts,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;status:no;scroll:no;");
            }
            else
            {
                 window.open(url,"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1");
            }
        }

    </script>

</head>
<body style="margin-left: 0; margin-top: 0; margin-right: 0; margin-bottom: 0;">
    <form id="form1" runat="server">
    <table id="Table1" cellspacing="0" cellpadding="0" width="99%" border="0" align="center">
        <tr>
            <td colspan="3" align="center">
                <table style="text-align: center;">
                    <tr>
                        <td>
                            <strong><span style="font-size: 12pt; color: #0099cc">注册卡档案</span></strong>
                        </td>
                        
                        <br />
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="3">
                <asp:DataGrid ID="g" runat="server" BackColor="#6CA4E4" CellPadding="5" Width="100%"
                    CellSpacing="1" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False"
                    AllowPaging="True" CssClass="gStyle" OnItemCommand="g_ItemCommand" OnItemDataBound="g_ItemDataBound">
                    <FooterStyle HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC"></FooterStyle>
                    <SelectedItemStyle HorizontalAlign="Center" Font-Bold="True" ForeColor="White"></SelectedItemStyle>
                    <HeaderStyle HorizontalAlign="Center" ForeColor="Navy" VerticalAlign="Middle" CssClass="gHeader">
                    </HeaderStyle>
                    <ItemStyle CssClass="gItem" BackColor="White" />
                    <Columns>
                        <asp:HyperLinkColumn DataNavigateUrlField="ID" DataNavigateUrlFormatString="GoodEdit.aspx?id={0}"
                            DataTextField="GoodName" HeaderText="商品名称" SortExpression="ID"></asp:HyperLinkColumn>
                        <asp:BoundColumn DataField="TypeName" SortExpression="TypeName" HeaderText="类别名称">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="GoodTypePrice" SortExpression="GoodTypePrice" HeaderText="商品价格">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="GoodNo" SortExpression="GoodNo" HeaderText="卡号"></asp:BoundColumn>
                        <asp:BoundColumn DataField="GoodNorm" SortExpression="GoodNorm" HeaderText="商品规格">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="GoodUnit" SortExpression="GoodUnit" HeaderText="商品单位">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="StatusName" SortExpression="StatusName" HeaderText="状态">
                        </asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="操作">
                            <ItemTemplate>
                                <ShoveWebUI:ShoveConfirmButton ID="btnDelete" runat="server" AlertText="确定要删除该注册卡吗？"
                                    BorderStyle="Solid" BorderWidth="1px" CommandName="btnDelete" Height="20px" Text="删除"
                                    Width="60px"></ShoveWebUI:ShoveConfirmButton>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:BoundColumn Visible="False" DataField="ID"></asp:BoundColumn>
                        <asp:BoundColumn Visible="False" DataField="Status"></asp:BoundColumn>
                    </Columns>
                    <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="#330099" BackColor="#FFFFCC">
                    </PagerStyle>
                </asp:DataGrid>
                <ShoveWebUI:ShoveGridPager ID="gPager" BorderWidth="0" CssClass="gStyle" BorderStyle="None"
                    runat="server" Width="100%" ShowSelectColumn="False" DataGrid="g" OnPageWillChange="gPager_PageWillChange"
                    OnSortBefore="gPager_SortBefore" AlternatingRowColor="White" HotColor="White"
                    GuiseColor="False" ClientNavigation="true" PageSize="10" />
                <br>
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: center;">
                <asp:Button ID="btnAdd" runat="server" Text="新增注册卡" Width="90px" OnClick="btnAdd_Click" />
                 &nbsp;&nbsp;               
                <asp:Button ID="btnDownload" runat="server" Text="下载模版" Width="90px" 
                    onclick="btnDownload_Click"  />
                 &nbsp;&nbsp;                
                <asp:Button ID="btnUpload" runat="server" Text="上传注册卡" Width="90px" 
                    OnClientClick="return ExcelInput()" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
